import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { router } from "./router";
import { createPinia } from "pinia";
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';

//代码高亮文件引入
import hljs from "highlight.js";
//样式文件,这里我选的是sublime样式，文件里面还有其他样式可供选择
import "highlight.js/styles/atom-one-light.css";

import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';

dayjs.locale('zh-cn'); // 设置 dayjs 全局语言为中文

const app = createApp(App);

app.directive("highlight", function (el) {
    const blocks = el.querySelectorAll("pre code");
    blocks.forEach((block) => {
      hljs.highlightBlock(block);
    });
  });

app.use(Antd).use(createPinia()).use(router).mount('#app')


